// Tags: Search
#include <algorithm>
#include <cstdio>

const int N = 55, inf = 0x3f3f3f3f;
int n, k, x[N], y[N], ans(inf);

struct Rect {
  int x1, y1, x2, y2;
  bool used;

  Rect() : x1(inf), y1(inf), x2(-inf), y2(-inf) {}

  inline void add(int x, int y) {
    used = true;
    x1 = std::min(x, x1);
    x2 = std::max(x, x2);
    y1 = std::min(y, y1);
    y2 = std::max(y, y2);
  }

  inline int area() { return used ? (x2 - x1) * (y2 - y1) : 0; }

  inline bool check(int x, int y) const {
    return x1 <= x && x <= x2 && y1 <= y && y <= y2;
  }

  inline bool check(const Rect &rhs) const {
    return (used && rhs.used)
               ? check(rhs.x1, rhs.y1) || check(rhs.x1, rhs.y2) ||
                     check(rhs.x2, rhs.y1) || check(rhs.x2, rhs.y2)
               : false;
  }
} rect[4];

inline bool check() {
  for (int i = 0; i < k; ++i) {
    for (int j = i + 1; j < k; ++j)
      if (rect[i].check(rect[j])) return true;
  }
  return false;
}

void dfs(int step, int area) {
  if (area > ans) return;
  if (step > n) {
    if (!check()) ans = std::min(ans, area);
    return;
  }
  for (int i = 0; i < k; ++i) {
    Rect tmp(rect[i]);
    rect[i].add(x[step], y[step]);
    dfs(step + 1, area + rect[i].area() - tmp.area());
    rect[i] = tmp;
  }
}

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("testdata.in", "r", stdin);
  freopen("testdata.out", "w", stdout);
#else
  freopen("P1034 矩形覆盖.in", "r", stdin);
  freopen("P1034 矩形覆盖.out", "w", stdout);
#endif
#endif

  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) { scanf("%d%d", &x[i], &y[i]); }
  dfs(1, 0);
  printf("%d", ans);
  return 0;
}